


		

			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
	


*-------------------------------------------------------------------------------
* This file looks at removals 
*-------------------------------------------------------------------------------


**
*Start by appending all removals data (note overlapping datasets and differing variable names)
**

use "allyears.dta", clear

**drop later removals
drop if departedd >= d(01oct2011)

**rename vars
rename departedd departed_date
decode removalprogram , gen(program)

**append later data
append using "removals12-20"

**month
gen month=mofd(departed_d)
format month %tm

**fix category variable
decode category, gen(temp)
replace case_category = temp if case_category == ""
drop temp

*fix charge variable
replace finalchargesection = final_charge_section if finalchargesection == ""
gen ewi = 1 if finalchargesection == "212a6Ai"

*fix convictions variable
decode mostseriouscriminalconviction, gen(conviction)
replace conviction = most_severe_conviction_charge if conviction == ""

*interior
gen interior = 1 if program != "" & program != "Border Patrol" & ///
 program != "Inspections - Air" & program != "Inspections - Land" & ///
 program != "Inspections - Sea"
replace interior  = 0 if interior != 1 & program != ""

*corrected version of interior removals
gen interiorcorrected = interior
replace interiorcorrected = 0 if case_category == "[9] VR Under Safeguards" | ///
case_category == "[8F] Expedited Removal" | case_category == "[8G] Expedited Removal - Credible Fear Referral"

*entry data
replace entrydate = entry_date if entry_date != .
gen entrymissing = entrydate == .
gen length = (departed_d - entrydate) / 365
gen interiorlength = length if interiorcorrected == 1
gen interiorentrymissing = entrymissing if interiorcorrected == 1

**threat levels
replace rcthreat = rc_threat if rcthreat == ""
gen interiorcat1 = interiorcorrected == 1 & rcthreat == "1"
gen interiorcat2 = interiorcorrected == 1 & rcthreat == "2"
gen interiorcat3 = interiorcorrected == 1 & rcthreat == "3"
gen interiorcat0 = interiorcorrected == 1 & rcthreat == "NA"

*numeric threat level
gen threat = 0 if rcthr == "NA"
replace threat = 1 if rcthr == "3"
replace threat = 2 if rcthr == "2"
replace threat = 3 if rcthr == "3"

**age
destring age, gen(age) force
replace age = . if interiorcorrected != 1

*create fiscal year
gen fy = 2003 if month >= m(2002m10) & month <= m(2003m9)
forval i = 2003/2020 {
local y = `i' + 1
replace fy = `y' if month >= m(`i'm10) & month <= m(`y'm9)
}


***
*Now make monthly categories
***

gen g287 = program == "287G Program"
gen detaindeport = program == "Detention and Deportation"
gen cap = program == "ERO Criminal Alien Program"
gen fugitive = program == "Fugitive Operations"
gen bp = program == "Border Patrol"
gen inspections = program == "Inspections - Air" | program == "Inspections - Land" | program == "Inspections - Sea"
gen investigations = program == "Non-User Fee Investigations"
gen admin = case_category == "[11] Administrative Deportation / Removal"
gen reinst = case_category == "[11] Administrative Deportation / Removal"
gen deportable = case_category == "[3] Deportable - Administratively Final Order"
gen excludable = case_category == "[8C] Excludable / Inadmissible - Administrative Final Order Issued"
gen er = case_category == "[8F] Expedited Removal" | case_category == "[8G] Expedited Removal - Credible Fear Referral"
gen vr = case_category == "[9] VR Under Safeguards"
gen missingprogram = program == ""

gen total = 1
gen interiorewi = 1 if ewi == 1 & interiorcorrected == 1


**Mexican variable
replace countryofcitizenship = ero_citizenship if countryofcitizenship == ""
gen mexican = countryofcitizenship == "MEXICO"
gen interiormex = mexican == 1 & interiorcorrected == 1



***
*Collapse
***

drop fy
collapse (sum) ewi interior-interiorcorrected interiorcat1-interiormex ///
 (mean) age length entrymissing interiorlength interiorentrymissing, by(month)


**Crime categories

gen cat3or0 = interiorcat3 + interiorcat0
gen cat1or2 = interiorcat2 + interiorcat1
gen notcat1 = cat3or0 + interiorcat2 



**
*PEP
**

*All 
twoway (line interiorcorr month if month >= 648 & month <= 696) , ///
xlabel(648(12)696, noticks format(%tmCY))  ///
legend(off) ///
yti(Monthly Interior Removals) ti() xti(Year) ///
xline(657, lpattern(dot)) xline(683, lpattern(dot)) ///
text(5500 655.5 "Priority Enforcement Program", placement(v) orientation(vertical) size(small)) ///
text(7000 681.5 "End of Priorities", placement(v) orientation(vertical) size(small))
graph export "figure2.pdf", replace


*Level 1 vs. 0
twoway (line interiorcat1 month if month >= 648 & month <= 696)  ///
(line interiorcat0 month if month >= 648 & month <= 696) , ///
xlabel(648(12)696, noticks format(%tmCY))  ///
legend(order(1 "Level 1 Convictions" 2 "No Convictions"  )) ///
yti(Monthly Interior Removals) ti() xti(Year) ///
xline(657, lpattern(dot)) xline(683, lpattern(dot)) ///
text(1900 657 "Priority Enforcement", placement(v) orientation(vertical) size(small)) ///
text(1500 683 "Trump Takes Office", placement(v) orientation(vertical) size(small))
graph export "figure3.pdf", replace




***
*Appendix
***

*create border count
gen border = total - interiorcorrected

**Figure showing different definitions over time
twoway (line border month) (line interior month) (line interiorcorrected month) , ///
xlabel(504(24)720, noticks format(%tmCY)) ///
legend(order(1 "Border" 2 "Interior (ICE Definition)" 3 "Interior (Restricted Definition)"))
graph export "figurea1.pdf", replace

*Morton Memo
twoway (line cat3or0 month if month >= m(2009m6) & month <= m(2013m6)) ///
(line cat1or2 month if month >= m(2009m6) & month <= m(2013m6))   , ///
xlabel(600(12)636, noticks format(%tmCY))  ///
legend(order(1 "None or Level 3" 2 "Level 1 or 2" )) ///
yti(Monthly Interior Removals) ti(Interior Removals Over Time) xti(Year) ///
xline(617, lpattern(dot)) text(4000 617 "Morton Memo", placement(v) orientation(vertical) size(small))
graph export "figurea2.pdf", replace



